import javax.mail.MessagingException;
import java.util.Scanner;
import java.util.Timer;
import java.util.TimerTask;

public class text {

    public static void main(String[] args) {
        System.out.println("请输入邮箱");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.next();

        int num;
        num=(int)(Math.random()*8999)+1000;
//		18003777714@163.com   1284906196@qq.com  2036598530@qq.com  leslie_341@163.com
//		sendEmail("服务器地址", "发送人", "授权码", "接受人", "标题", "正文信息");
           until.sendEmail("smtp.163.com", name, "l122312", "17613637319@163.com", "您的验证码是",
                    num);
        System.out.println("请输入邮箱验证码");
        Scanner sca = new Scanner(System.in);
        Integer pwd = scanner.nextInt();
        if (pwd!=num){
            System.out.println("验证码错误");
        }else {
            System.out.println("欢迎登录");
        }
    }
}
